﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcProject.Models.Team>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm())
       {%>
    <h2>
        项目列表</h2>
    <div>
        <div class="editor-label">
            所属项目名称
            <%: Html.DropDownList("projectId", ViewData["projectinfos"] as SelectList, "---全部项目---")%>
            <input type="submit" value="查询" />
        </div>
    </div>
    <h2>
        班组列表</h2>
    <table>
        <tr>
            <th>
                班组名称
            </th>
            <th>
                班组负责人
            </th>
            <th>
                班级负责人身份证号
            </th>
            <th>
                创建人
            </th>
            <th>
                创建时间
            </th>
            <th>
                操作
            </th>
        </tr>
        <% if (Model != null) foreach (var item in Model)
               { %>
        <tr>
            <td>
                <%: item.TeamName %>
            </td>
            <td>
                <%: item.TeamLeader %>
            </td>
            <td>
                <%: item.TeamLeaderCardId %>
            </td>
            <td>
                <%: item.CreateUserName %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.CreateDate) %>
            </td>
            <td>
                <%: Html.ActionLink("编辑", "Edit", new { id=item.TeamId }) %>
                |
                <%: Html.ActionLink("详细信息", "Details", new { id=item.TeamId })%>
                |
                <%: Html.ActionLink("删除", "Delete", new { id=item.TeamId })%>
            </td>
        </tr>
        <% } %>
        <% } %>
    </table>
    <p>
        <%: Html.ActionLink("创建新班组", "Create")%>
    </p>
</asp:Content>
